function loginin() {
    if (event.keyCode == 13) {
        $("#login").click();
    }
}

function login() {
    let data1 = {
        name: $("#personnelNumber").val(),
        password: $("#password").val()
    };
    let data = myAjax("/user/login", data1, "post");
    if (data.code==200){
        localStorage.setItem("access_token",data.data.access_token);
        window.location.href = 'main.html';
    }
    // if ()
    // if (data.result == 0) {
    //     alert("登录0");
    // } else if (data.result == 2) {
    //     alert("登录2");
    // } else if (data.result == 1) {
    //     window.location.href = 'main.html';
    //     // alert("登录成功");
    // }
};

//刷新 验证码~~~~=======================================================